Skip to content

Conversation

@harsh-hak
Copy link

  1. dompurify
    What it is: A library that sanitizes HTML.
    Why it's needed: If your application ever renders HTML content dynamically (for example, displaying a user's bio or a formatted article from your API), hackers can try to inject malicious scripts (Cross-Site Scripting or XSS). dompurify strips out dangerous tags (like <script>) while keeping safe HTML (like or

    ) intact.

  2. @types/dompurify
    What it is: The TypeScript type definitions for dompurify.
    Why it's needed: Even if you are writing standard JavaScript, modern code editors (like VS Code) use these types to provide autocomplete suggestions and error checking. It ensures you are using the dompurify library correctly.

  3. eslint-plugin-security
    What it is: A plugin for ESLint (the tool that checks your code for errors).

Why it's needed: It acts like an automated security guard that watches you code. It scans your source code for patterns that are known to be insecure, such as:

  • Dangerous Regular Expressions (which can cause server crashes via ReDoS attacks).
  • Use of eval() (which allows arbitrary code execution).
  • Insecure file access patterns.

@elanlaw1206 elanlaw1206 self-requested a review January 18, 2026 03:24
@elanlaw1206
Copy link
Contributor

HI Harsh,
Thanks Harsh , this is a solid cleanup and a good move toward CI-based security scanning

I’m happy with removing the legacy Vulnerability_Tool and the .docx artefacts , they weren’t used by CI and this reduces repo noise. Replacing that with npm audit in CI makes sense for maintainability.

Before I approve, could you please confirm two small things:

multer upgrade: since this can affect upload behaviour, can you confirm either (a) upload endpoints still work as expected, or (b) we don’t rely on multer-based uploads in this repo?

Token expiry comment: accessTokenExpiry is now 10m (more secure ), but the inline comment still says “15 minutes” , please update it for consistency.

Once those are confirmed/fixed, tag me and I’ll approve straight away

Thanks
King Hei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants